import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createPinia } from 'pinia'
// import axios from '@/util/axios.js'
// import axios from 'axios'
// import VueAxios from 'vue-axios'

// import './assets/main.css'
import 'element-plus/dist/index.css'


const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	app.component(key, component)
}
app.use(router)
app.use(ElementPlus)
app.use(createPinia())
// app.use(VueAxios, axios)	
// //然而只是这样全局并不能用;
// app.provide('axios', app.config.globalProperties.axios) 
// //这句不写, 组件里无法注入全局axios, 也就无法使用

app.mount('#app')

// app.config.globalProperties.$axios=axios;
